The present invention relates to the field of reference resolution in a just in time compilation environment.
Computer program code is compiled for implementation, which involves reading the program code, analyzing the semantic form for errors, optimizing the code to reduce cost during execution and translating the code into a language suitable for execution. During compiling, references in the code to other classes or data are resolved to incorporate memory locations for these referenced classes or data. However, if the references to be resolved are for classes or data that have not been loaded then resolution of these references may not be possible. Such references can be resolved during execution of the program code as the references are encountered and the classes or data are loaded.
In a Java programming environment, the code is compiled into bytecode that is interpreted by a Java Virtual Machine for execution. Alternatively, a just in time compiler turns the bytecode into instructions that can be executed directly by a processor. Since classes may be dynamically loaded in the Java environment, cross references among classes that are loaded at different times are taken into account during reference resolution.